package com.auto.base.net

import okhttp3.Interceptor
import okhttp3.Response

class TokenInterceptor : Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val originalRequest = chain.request()
        // 添加鉴权头
        val modifiedRequest = originalRequest
            .newBuilder()
            .header("Authorization", QlConstant.token)
            .build()
        val response = chain.proceed(modifiedRequest)
        return response
    }
}